home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_03_06
/
3n06021a
< prev
next >
Wrap
Text File
|
1992-03-18
|
531b
|
29 lines
/* Contrived buggy example to illustrate */
/* diagnosing UAE with Dr. Watson. */
#include <windows.h>
/* export all functions during debugging */
/* to aid Dr. Watson UAE diagnosis */
#if DEBUG
#define DBG _export
#else
#define DBG
#endif
int DBG add_indirect(LPWORD, LPWORD);
int PASCAL WinMain(HANDLE hInstance,
HANDLE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
WORD a = 1;
LPWORD p = NULL;
return add_indirect(&a, p);
}
int DBG add_indirect(LPWORD a, LPWORD b)
{
return *a + *b;
}